﻿using System;
using System.Collections.Generic;
using Algoritmia.DataStructures.Digraphs;

namespace Algoritmia.Problems.Traversals
{
    public interface IGraphTraverser<TVertex,TResult>
    {
        IEnumerable<TResult> Traverse(IDigraph<TVertex> digraph, TVertex source,
                                      Func<TVertex, TVertex, TResult> preVisitor = null,
                                      Func<TVertex, TVertex, TResult> postVisitor = null);

        IEnumerable<TResult> FullTraverse(IDigraph<TVertex> digraph,
                                          Func<TVertex, TVertex, TResult> preVisitor = null,
                                          Func<TVertex, TVertex, TResult> postVisitor = null);
    }
}
